# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for GPSBabel 1.5.4.
#
-# Report bugs to <BUG-REPORT-ADDRESS>.
-#
#
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
#
$as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
$as_echo "$0: be upgraded to zsh 4.3.4 or later."
else
- $as_echo "$0: Please tell bug-autoconf@gnu.org and BUG-REPORT-ADDRESS
-$0: about your system, including any error possibly output
-$0: before this message. Then install a modern shell, or
-$0: manually run the script under such a shell if you do
-$0: have one."
+ $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
+$0: including any error possibly output before this
+$0: message. Then install a modern shell, or manually run
+$0: the script under such a shell if you do have one."
fi
exit 1
fi
PACKAGE_TARNAME='gpsbabel'
PACKAGE_VERSION='1.5.4'
PACKAGE_STRING='GPSBabel 1.5.4'
-PACKAGE_BUGREPORT='BUG-REPORT-ADDRESS'
+PACKAGE_BUGREPORT=''
PACKAGE_URL=''
# Factoring default headers for most tests.
--disable-option-checking ignore unrecognized --enable/--with options
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --enable-shapefile=(yes)|no
- --enable-csv=(yes)|no
- --enable-most=(yes)|no
- --enable-filters=(yes)|no
- --enable-efence=yes|(no)
+ --disable-shapefile
+ --disable-csv
+ --disable-most
+ --disable-filters
+ --enable-efence
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-zlib=(included)|system|no
- --with-doc=DIR Path where the documentation will be stored.
+
+ --with-doc=DIR Path where the documentation will be stored.
Some influential environment variables:
CC C compiler command
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
-Report bugs to <BUG-REPORT-ADDRESS>.
+Report bugs to the package provider.
_ACEOF
ac_status=$?
fi
$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
-( $as_echo "## --------------------------------- ##
-## Report this to BUG-REPORT-ADDRESS ##
-## --------------------------------- ##"
- ) | sed "s/^/$as_me: WARNING: /" >&2
;;
esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
fi
-if test $GCC = yes; then
- CFLAGS="$CFLAGS -Wall"
- CXXFLAGS="$CXXFLAGS -Wall"
+if test "$GCC" = "yes"; then :
+
+ CFLAGS="$CFLAGS -Wall"
+ CXXFLAGS="$CXXFLAGS -Wall"
+
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to support shapefiles" >&5
$as_echo_n "checking whether to support shapefiles... " >&6; }
# Check whether --enable-shapefile was given.
if test "${enable_shapefile+set}" = set; then :
- enableval=$enable_shapefile; enable_shapefile="$enableval"
+ enableval=$enable_shapefile;
else
- enable_shapefile="yes"
+ enable_shapefile=yes
fi
- if test "$enable_shapefile" != "no" ; then
+if test "$enable_shapefile" = "yes"; then :
+
$as_echo "#define SHAPELIB_ENABLED 1" >>confdefs.h
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shapefile" >&5
+$as_echo "$enable_shapefile" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to support csv formats" >&5
$as_echo_n "checking whether to support csv formats... " >&6; }
# Check whether --enable-csv was given.
if test "${enable_csv+set}" = set; then :
- enableval=$enable_csv; enable_csv="$enableval"
+ enableval=$enable_csv;
else
- enable_csv="yes"
+ enable_csv=yes
fi
- if test "$enable_csv" != "no" ; then
+if test "$enable_csv" = "yes"; then :
+
$as_echo "#define CSVFMTS_ENABLED 1" >>confdefs.h
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_csv" >&5
+$as_echo "$enable_csv" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to support maximum number of formats" >&5
$as_echo_n "checking whether to support maximum number of formats... " >&6; }
# Check whether --enable-most was given.
if test "${enable_most+set}" = set; then :
- enableval=$enable_most; enable_most="$enableval"
+ enableval=$enable_most;
else
- enable_most="yes"
+ enable_most=yes
fi
- if test "$enable_most" != "no" ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+if test "$enable_most" = "yes"; then :
+
$as_echo "#define MAXIMAL_ENABLED 1" >>confdefs.h
FMTS='$(ALL_FMTS)'
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+
+else
+
FMTS='$(MINIMAL_FMTS)'
- fi
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_most" >&5
+$as_echo "$enable_most" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to support filters" >&5
$as_echo_n "checking whether to support filters... " >&6; }
# Check whether --enable-filters was given.
if test "${enable_filters+set}" = set; then :
- enableval=$enable_filters; enable_filters="$enableval"
+ enableval=$enable_filters;
else
- enable_filters="yes"
+ enable_filters=yes
fi
- if test "$enable_filters" != "no" ; then
+if test "$enable_filters" = "yes"; then :
+
$as_echo "#define FILTERS_ENABLED 1" >>confdefs.h
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_filters" >&5
+$as_echo "$enable_filters" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to support zlib" >&5
$as_echo_n "checking whether to support zlib... " >&6; }
withval=$with_zlib;
fi
- case $with_zlib in
- "system")
+case $with_zlib in #(
+ "system") :
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gzopen in -lz" >&5
$as_echo_n "checking for gzopen in -lz... " >&6; }
if ${ac_cv_lib_z_gzopen+:} false; then :
fi
- ;;
- "no")
+ ;; #(
+ "no") :
+
$as_echo "#define ZLIB_INHIBITED 1" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
- ;;
- *) ZLIB="\$(ZLIB)"
+ ;; #(
+ *) :
+
+ ZLIB="\$(ZLIB)"
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: using included version" >&5
-$as_echo "using included version" >&6; };;
- esac
+$as_echo "using included version" >&6; }
+ ;;
+esac
+
+case "$target" in #(
+ *-*-mingw32*) :
-case "$target" in
- *-*-mingw32*)
FILEINFO=fileinfo.o
- if test "$CC" = gcc ; then
+ if test "$CC" = "gcc"; then :
+
RC=windres
- else
+
+else
+
RC=`echo "$CC" | sed -e 's/gcc$/windres/'`
- fi
- ;;
- *)
- RC=false
- ;;
+
+fi
+ ;; #(
+ *) :
+
+ RC=false
+ ;;
esac
fi
-if test "$QMAKE" = no ; then
- as_fn_error $? "Qt5.2 or higher is required, but was not found" "$LINENO" 5;
+if test "$QMAKE" = "no"; then :
+
+ as_fn_error $? "Qt5.2 or higher is required, but was not found" "$LINENO" 5;
+
fi
# guess the name of the Qt Core library.
QT_LIBVER=$($QMAKE -query -query QT_VERSION | sed -e 's/\..*//')
-if test "$QT_LIBVER" -ge 5 ; then
+if test "$QT_LIBVER" -ge 5; then :
+
QT_LIBS="-L$($QMAKE -query QT_INSTALL_LIBS) -lQt${QT_LIBVER}Core"
+
else
+
QT_LIBS="-L$($QMAKE -query QT_INSTALL_LIBS) -lQtCore"
+
fi
QT_INC=$($QMAKE -query QT_INSTALL_HEADERS)
QT_INC_OPT="-I"
QT_SYSINC_OPT="-isystem"
-case "$target" in
- *-*-cygwin* | *-*-mingw32*)
+case "$target" in #(
+ *-*-cygwin* | *-*-mingw32*) :
GBSER=gbser_win.o
- if test "$with_libusb" = no ; then
+ if test "$with_libusb" = "no"; then :
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: USB skipped" >&5
$as_echo "USB skipped" >&6; }
OSJEEPS=jeeps/gpsusbstub.o
- else
+
+else
+
OSJEEPS=jeeps/gpsusbwin.o
USB_LIBS="-lsetupapi -lole32 -lws2_32 -luuid"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Windows DDK" >&5
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
- LIBS="$old_LIBS"
- fi
- ;;
- *-*-darwin*)
- GBSER=gbser_posix.o
- OSJEEPS="jeeps/gpslibusb.o \
- mac/libusb/darwin.o \
- mac/libusb/descriptors.o \
- mac/libusb/error.o \
- mac/libusb/usb.o "
- USB_LIBS="-framework IOKit -framework CoreFoundation"
- $as_echo "#define HAVE_LIBUSB 1" >>confdefs.h
-
-
- # On Mac, use frameworks for includes and library files.
- # Macports uses a non-standard build of Qt with an added
- # QT_INSTALL_FRAMEWORKS flag, so look for thier custom
- # version first. That will fail on 'normal' Qt so fall
- # back to QT_INSTALL_LIBS.
- QT_FW_OR_LIBS=$($QMAKE -query QT_INSTALL_FRAMEWORKS)
- if test $QT_FW_OR_LIBS = "**Unknown**" ; then
- QT_FW_OR_LIBS=$($QMAKE -query QT_INSTALL_LIBS)
- fi
- QT_LIBS="-Wl,-rpath, $QT_FW_OR_LIBS -F$QT_FW_OR_LIBS -framework QtCore"
- QT_INC="$QT_FW_OR_LIBS"
- QT_INC_OPT="-F"
- QT_SYSINC_OPT="-iframework"
- ;;
- *-*-freebsd*)
+ LIBS="$old_LIBS"
+
+fi
+ ;; #(
+ *-*-darwin*) :
+
+ GBSER=gbser_posix.o
+ OSJEEPS="jeeps/gpslibusb.o \
+ mac/libusb/darwin.o \
+ mac/libusb/descriptors.o \
+ mac/libusb/error.o \
+ mac/libusb/usb.o "
+ USB_LIBS="-framework IOKit -framework CoreFoundation"
+ $as_echo "#define HAVE_LIBUSB 1" >>confdefs.h
+
+
+ # On Mac, use frameworks for includes and library files.
+ # Macports uses a non-standard build of Qt with an added
+ # QT_INSTALL_FRAMEWORKS flag, so look for thier custom
+ # version first. That will fail on 'normal' Qt so fall
+ # back to QT_INSTALL_LIBS.
+ QT_FW_OR_LIBS=$($QMAKE -query QT_INSTALL_FRAMEWORKS)
+ if test "$QT_FW_OR_LIBS" = "**Unknown**"; then :
+
+ QT_FW_OR_LIBS=$($QMAKE -query QT_INSTALL_LIBS)
+
+fi
+ QT_LIBS="-Wl,-rpath, $QT_FW_OR_LIBS -F$QT_FW_OR_LIBS -framework QtCore"
+ QT_INC="$QT_FW_OR_LIBS"
+ QT_INC_OPT="-F"
+ QT_SYSINC_OPT="-iframework"
+ ;; #(
+ *-*-freebsd*) :
+
GBSER=gbser_posix.o
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libusb" >&5
$as_echo_n "checking for libusb... " >&6; }
- if test "$with_libusb" = no ; then
+ if test "$with_libusb" = "no"; then :
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: check not done" >&5
$as_echo "check not done" >&6; }
OSJEEPS=jeeps/gpsusbstub.o
- else
+
+else
+
OLDFLAGS=$LDFLAGS
OCFLAGS=$CFLAGS
LDFLAGS="$LDFLAGS -lusb"
USB_CFLAGS=""
USB_LIBS="-lusb"
-# ,[AC_MSG_ERROR([libusb is needed])]
+ #,[AC_MSG_ERROR([libusb is needed])]
fi
OSJEEPS=jeeps/gpslibusb.o
CFLAGS="$OCFLAGS"
- fi
- ;;
- *)
+
+fi
+ ;; #(
+ *) :
+
GBSER=gbser_posix.o
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libusb" >&5
$as_echo_n "checking for libusb... " >&6; }
- if test "$with_libusb" = no ; then
+ if test "$with_libusb" = "no"; then :
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: check not done" >&5
$as_echo "check not done" >&6; }
OSJEEPS=jeeps/gpsusbstub.o
- else
+
+else
+
# Extract the first word of "libusb-config", so it can be a program name with args.
set dummy libusb-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
fi
- if test "$LIBUSBCONFIG" = true; then
- OLDFLAGS=$LDFLAGS
- OCFLAGS=$CFLAGS
- LDFLAGS="$LDFLAGS `libusb-config --libs`"
- CFLAGS="$OCFLAGS `libusb-config --cflags`"
+ if test "$LIBUSBCONFIG" = "true"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usb_interrupt_read in -lusb" >&5
+ OLDFLAGS=$LDFLAGS
+ OCFLAGS=$CFLAGS
+ LDFLAGS="$LDFLAGS `libusb-config --libs`"
+ CFLAGS="$OCFLAGS `libusb-config --cflags`"
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usb_interrupt_read in -lusb" >&5
$as_echo_n "checking for usb_interrupt_read in -lusb... " >&6; }
if ${ac_cv_lib_usb_usb_interrupt_read+:} false; then :
$as_echo_n "(cached) " >&6
$as_echo "#define HAVE_LIBUSB 1" >>confdefs.h
- USB_CFLAGS="`libusb-config --cflags`"
- USB_LIBS="`libusb-config --libs`"
-# ,[AC_MSG_ERROR([libusb >= 0.1.8 is needed])]
+ USB_CFLAGS="`libusb-config --cflags`"
+ USB_LIBS="`libusb-config --libs`"
+ #,[AC_MSG_ERROR([libusb >= 0.1.8 is needed])]
fi
- OSJEEPS=jeeps/gpslibusb.o
- CFLAGS="$OCFLAGS"
- # LIBS="$LIBS `libusb-config --libs`"
- else
- OSJEEPS=jeeps/gpsusbstub.o
- fi
- fi
- ;;
+ OSJEEPS=jeeps/gpslibusb.o
+ CFLAGS="$OCFLAGS"
+ #LIBS="$LIBS `libusb-config --libs`"
+
+else
+
+ OSJEEPS=jeeps/gpsusbstub.o
+
+fi
+
+fi
+ ;;
esac
-case "$target" in
- *-linux-*)
+case "$target" in #(
+ *-linux-*) :
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Linux HID interface" >&5
$as_echo_n "checking for Linux HID interface... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
$as_echo "no" >&6; }
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- ;;
+ ;; #(
+ *) :
+ ;;
esac
-case "$target" in
- *-*-darwin*)
- ;;
- *)
+case "$target" in #(
+ *-*-darwin*) :
+
+ ;; #(
+ *) :
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for reduce relocations" >&5
$as_echo_n "checking for reduce relocations... " >&6; }
OCPPFLAGS="$CPPFLAGS"
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
CPPFLAGS="$OCPPFLAGS"
- ;;
+ ;;
esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for random stuff to make you feel better" >&5
$as_echo_n "checking for efence... " >&6; }
# Check whether --enable-efence was given.
if test "${enable_efence+set}" = set; then :
- enableval=$enable_efence; if test "$enable_efence" != "no" ; then
- EFENCE_LIB=-lefence
- GPSBABEL_DEBUG=gpsbabel-debug
- INSTALL_DEBUG=install-debug
- fi
+ enableval=$enable_efence; if test "$enable_efence" != "no"; then :
+
+ EFENCE_LIB=-lefence
+ GPSBABEL_DEBUG=gpsbabel-debug
+ INSTALL_DEBUG=install-debug
+
+fi
fi
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOCDIR" >&5
+$as_echo "$DOCDIR" >&6; }
# Checks for header files.
# AC_HEADER_STDC
Configuration headers:
$config_headers
-Report bugs to <BUG-REPORT-ADDRESS>."
+Report bugs to the package provider."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
fi
-
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
-AC_PREREQ(2.59)
+AC_PREREQ([2.59])
#PACKAGE_RELEASE=
-AC_INIT(GPSBabel, 1.5.4, BUG-REPORT-ADDRESS)
+AC_INIT([GPSBabel], [1.5.4])
DOCVERSION=1.5.4
# YYYYMMDD, please, if beta, i.e. "-beta20060413"
# Checks for libraries.
AC_CHECK_LIB([m], [cos])
-if test $GCC = yes; then
- CFLAGS="$CFLAGS -Wall"
- CXXFLAGS="$CXXFLAGS -Wall"
-fi
-
-AC_MSG_CHECKING(whether to support shapefiles)
-AC_ARG_ENABLE(shapefile,
- [ --enable-shapefile=[(yes)|no]],
- [ enable_shapefile="$enableval"],[enable_shapefile="yes"])
- if test "$enable_shapefile" != "no" ; then
- AC_DEFINE(SHAPELIB_ENABLED, 1, [1 to enable shapefile support])
- AC_MSG_RESULT(yes)
- else
- AC_MSG_RESULT(no)
- fi
-
-AC_MSG_CHECKING(whether to support csv formats)
-AC_ARG_ENABLE(csv,
- [ --enable-csv=[(yes)|no]],
- [ enable_csv="$enableval"],[enable_csv="yes"])
- if test "$enable_csv" != "no" ; then
- AC_DEFINE(CSVFMTS_ENABLED, 1, [1 to enable the CSV formats support])
- AC_MSG_RESULT(yes)
- else
- AC_MSG_RESULT(no)
- fi
-
-AC_MSG_CHECKING(whether to support maximum number of formats)
-AC_ARG_ENABLE(most,
- [ --enable-most=[(yes)|no]],
- [ enable_most="$enableval"],[enable_most="yes"])
- if test "$enable_most" != "no" ; then
- AC_MSG_RESULT(yes)
- AC_DEFINE(MAXIMAL_ENABLED, 1, [1 to enable as many formats as possible])
+AS_IF([test "$GCC" = "yes"], [
+ CFLAGS="$CFLAGS -Wall"
+ CXXFLAGS="$CXXFLAGS -Wall"
+])
+
+AC_MSG_CHECKING([whether to support shapefiles])
+AC_ARG_ENABLE([shapefile],
+ [AS_HELP_STRING(
+ [--disable-shapefile],
+ [])],
+ [],
+ [AS_VAR_SET([enable_shapefile], [yes])])
+AS_IF([test "$enable_shapefile" = "yes"], [
+ AC_DEFINE(SHAPELIB_ENABLED, 1, [1 to enable shapefile support])
+])
+AC_MSG_RESULT([$enable_shapefile])
+
+AC_MSG_CHECKING([whether to support csv formats])
+AC_ARG_ENABLE([csv],
+ [AS_HELP_STRING(
+ [--disable-csv],
+ [])],
+ [],
+ [AS_VAR_SET([enable_csv], [yes])])
+AS_IF([test "$enable_csv" = "yes"], [
+ AC_DEFINE(CSVFMTS_ENABLED, 1, [1 to enable the CSV formats support])
+])
+AC_MSG_RESULT([$enable_csv])
+
+AC_MSG_CHECKING([whether to support maximum number of formats])
+AC_ARG_ENABLE([most],
+ [AS_HELP_STRING(
+ [--disable-most],
+ [])],
+ [],
+ [AS_VAR_SET([enable_most], [yes])])
+AS_IF([test "$enable_most" = "yes"], [
+ AC_DEFINE(MAXIMAL_ENABLED, 1, [1 to enable as many formats as possible])
FMTS='$(ALL_FMTS)'
- else
- AC_MSG_RESULT(no)
+], [
FMTS='$(MINIMAL_FMTS)'
- fi
- AC_SUBST(FMTS)
-
-AC_MSG_CHECKING(whether to support filters)
-AC_ARG_ENABLE(filters,
- [ --enable-filters=[(yes)|no]],
- [ enable_filters="$enableval"],[enable_filters="yes"])
- if test "$enable_filters" != "no" ; then
+])
+AC_SUBST(FMTS)
+AC_MSG_RESULT([$enable_most])
+
+AC_MSG_CHECKING([whether to support filters])
+AC_ARG_ENABLE([filters],
+ [AS_HELP_STRING(
+ [--disable-filters],
+ [])],
+ [],
+ [AS_VAR_SET([enable_filters], [yes])])
+AS_IF([test "$enable_filters" = "yes"], [
AC_DEFINE(FILTERS_ENABLED, 1, [1 to enable all the filters.])
- AC_MSG_RESULT(yes)
- else
- AC_MSG_RESULT(no)
- fi
-
-AC_MSG_CHECKING(whether to support zlib)
-AC_ARG_WITH(zlib, [ --with-zlib=[(included)|system|no]])
- case $with_zlib in
- "system")
+])
+AC_MSG_RESULT([$enable_filters])
+
+AC_MSG_CHECKING([whether to support zlib])
+AC_ARG_WITH([zlib],
+ [AS_HELP_STRING(
+ [--with-zlib=(included)|system|no],
+ [])])
+AS_CASE([$with_zlib], ["system"], [
AC_CHECK_LIB([z], [gzopen])
- ;;
- "no")
- AC_DEFINE(ZLIB_INHIBITED, 1, [1 to inhibit our use of zlib.])
- AC_MSG_RESULT(no)
- ;;
- *) ZLIB="\$(ZLIB)"
- AC_MSG_RESULT(using included version);;
- esac
-
-case "$target" in
- *-*-mingw32*)
+], ["no"], [
+ AC_DEFINE(ZLIB_INHIBITED, 1, [1 to inhibit our use of zlib.])
+ AC_MSG_RESULT([no])
+], [
+ ZLIB="\$(ZLIB)"
+ AC_MSG_RESULT([using included version])
+])
+
+AS_CASE(["$target"], [*-*-mingw32*], [
FILEINFO=fileinfo.o
- if test "$CC" = gcc ; then
+ AS_IF([test "$CC" = "gcc"], [
RC=windres
- else
+ ], [
RC=`echo "$CC" | sed -e 's/gcc$/windres/'`
- fi
- ;;
- *)
- RC=false
- ;;
-esac
+ ])
+], [
+ RC=false
+])
AC_SUBST(FILEINFO)
AC_SUBST(RC)
# On RHEL/OEL/SL/CENTOS/FEDORA qmake is from Qt3, and qmake-qt4 is from Qt4.
AC_CHECK_TOOLS(LUPDATE, [lupdate-qt5 lupdate])
AC_CHECK_TOOLS(LRELEASE, [lrelease-qt5 lrelease])
-if test "$QMAKE" = no ; then
- AC_MSG_ERROR([Qt5.2 or higher is required, but was not found]);
-fi
+AS_IF([test "$QMAKE" = "no"], [
+ AC_MSG_ERROR([Qt5.2 or higher is required, but was not found]);
+])
# guess the name of the Qt Core library.
QT_LIBVER=$($QMAKE -query -query QT_VERSION | sed -e 's/\..*//')
-if test "$QT_LIBVER" -ge 5 ; then
+AS_IF([test "$QT_LIBVER" -ge 5], [
QT_LIBS="-L$($QMAKE -query QT_INSTALL_LIBS) -lQt${QT_LIBVER}Core"
-else
+], [
QT_LIBS="-L$($QMAKE -query QT_INSTALL_LIBS) -lQtCore"
-fi
+])
QT_INC=$($QMAKE -query QT_INSTALL_HEADERS)
QT_INC_OPT="-I"
QT_SYSINC_OPT="-isystem"
-case "$target" in
- *-*-cygwin* | *-*-mingw32*)
-
+AS_CASE(["$target"], [*-*-cygwin* | *-*-mingw32*], [
GBSER=gbser_win.o
- if test "$with_libusb" = no ; then
+ AS_IF([test "$with_libusb" = "no"], [
AC_MSG_RESULT(USB skipped)
OSJEEPS=jeeps/gpsusbstub.o
- else
+ ], [
OSJEEPS=jeeps/gpsusbwin.o
USB_LIBS="-lsetupapi -lole32 -lws2_32 -luuid"
AC_MSG_CHECKING(for Windows DDK)
[AC_DEFINE(HAVE_WDK, 1, [Defined if you have Windows DDK])]
[USB_LIBS=${USB_LIBS}" -lhid"],
[AC_MSG_RESULT(no)]
- )
- LIBS="$old_LIBS"
- fi
- ;;
- *-*-darwin*)
- GBSER=gbser_posix.o
- OSJEEPS="jeeps/gpslibusb.o \
- mac/libusb/darwin.o \
- mac/libusb/descriptors.o \
- mac/libusb/error.o \
- mac/libusb/usb.o "
- USB_LIBS="-framework IOKit -framework CoreFoundation"
- AC_DEFINE(HAVE_LIBUSB, 1)
-
- # On Mac, use frameworks for includes and library files.
- # Macports uses a non-standard build of Qt with an added
- # QT_INSTALL_FRAMEWORKS flag, so look for thier custom
- # version first. That will fail on 'normal' Qt so fall
- # back to QT_INSTALL_LIBS.
- QT_FW_OR_LIBS=$($QMAKE -query QT_INSTALL_FRAMEWORKS)
- if test $QT_FW_OR_LIBS = "**Unknown**" ; then
- QT_FW_OR_LIBS=$($QMAKE -query QT_INSTALL_LIBS)
- fi
- QT_LIBS="-Wl,-rpath, $QT_FW_OR_LIBS -F$QT_FW_OR_LIBS -framework QtCore"
- QT_INC="$QT_FW_OR_LIBS"
- QT_INC_OPT="-F"
- QT_SYSINC_OPT="-iframework"
- ;;
- *-*-freebsd*)
+ )
+ LIBS="$old_LIBS"
+ ])
+], [*-*-darwin*], [
+ GBSER=gbser_posix.o
+ OSJEEPS="jeeps/gpslibusb.o \
+ mac/libusb/darwin.o \
+ mac/libusb/descriptors.o \
+ mac/libusb/error.o \
+ mac/libusb/usb.o "
+ USB_LIBS="-framework IOKit -framework CoreFoundation"
+ AC_DEFINE(HAVE_LIBUSB, 1)
+
+ # On Mac, use frameworks for includes and library files.
+ # Macports uses a non-standard build of Qt with an added
+ # QT_INSTALL_FRAMEWORKS flag, so look for thier custom
+ # version first. That will fail on 'normal' Qt so fall
+ # back to QT_INSTALL_LIBS.
+ QT_FW_OR_LIBS=$($QMAKE -query QT_INSTALL_FRAMEWORKS)
+ AS_IF([test "$QT_FW_OR_LIBS" = "**Unknown**"], [
+ QT_FW_OR_LIBS=$($QMAKE -query QT_INSTALL_LIBS)
+ ])
+ QT_LIBS="-Wl,-rpath, $QT_FW_OR_LIBS -F$QT_FW_OR_LIBS -framework QtCore"
+ QT_INC="$QT_FW_OR_LIBS"
+ QT_INC_OPT="-F"
+ QT_SYSINC_OPT="-iframework"
+], [*-*-freebsd*], [
GBSER=gbser_posix.o
AC_MSG_CHECKING(for libusb)
- if test "$with_libusb" = no ; then
+ AS_IF([test "$with_libusb" = "no"], [
AC_MSG_RESULT(check not done)
OSJEEPS=jeeps/gpsusbstub.o
- else
+ ], [
OLDFLAGS=$LDFLAGS
OCFLAGS=$CFLAGS
LDFLAGS="$LDFLAGS -lusb"
AC_DEFINE(HAVE_LIBUSB, 1, [Defined if you have libusb])
[USB_CFLAGS=""]
[USB_LIBS="-lusb"]
-# ,[AC_MSG_ERROR([libusb is needed])]
- )
+ #,[AC_MSG_ERROR([libusb is needed])]
+ )
OSJEEPS=jeeps/gpslibusb.o
CFLAGS="$OCFLAGS"
- fi
- ;;
- *)
+ ])
+], [
GBSER=gbser_posix.o
AC_MSG_CHECKING(for libusb)
- if test "$with_libusb" = no ; then
+ AS_IF([test "$with_libusb" = "no"], [
AC_MSG_RESULT(check not done)
OSJEEPS=jeeps/gpsusbstub.o
- else
+ ], [
AC_CHECK_PROG(LIBUSBCONFIG, libusb-config, true, false)
- if test "$LIBUSBCONFIG" = true; then
- OLDFLAGS=$LDFLAGS
- OCFLAGS=$CFLAGS
- LDFLAGS="$LDFLAGS `libusb-config --libs`"
- CFLAGS="$OCFLAGS `libusb-config --cflags`"
-
- AC_CHECK_LIB([usb], [usb_interrupt_read],
- AC_DEFINE(HAVE_LIBUSB, 1, [Defined if you have libusb])
- [USB_CFLAGS="`libusb-config --cflags`"]
- [USB_LIBS="`libusb-config --libs`"]
-# ,[AC_MSG_ERROR([libusb >= 0.1.8 is needed])]
+ AS_IF([test "$LIBUSBCONFIG" = "true"], [
+ OLDFLAGS=$LDFLAGS
+ OCFLAGS=$CFLAGS
+ LDFLAGS="$LDFLAGS `libusb-config --libs`"
+ CFLAGS="$OCFLAGS `libusb-config --cflags`"
+
+ AC_CHECK_LIB([usb], [usb_interrupt_read],
+ AC_DEFINE(HAVE_LIBUSB, 1, [Defined if you have libusb])
+ [USB_CFLAGS="`libusb-config --cflags`"]
+ [USB_LIBS="`libusb-config --libs`"]
+ #,[AC_MSG_ERROR([libusb >= 0.1.8 is needed])]
)
- OSJEEPS=jeeps/gpslibusb.o
- CFLAGS="$OCFLAGS"
- # LIBS="$LIBS `libusb-config --libs`"
- else
- OSJEEPS=jeeps/gpsusbstub.o
- fi
- fi
- ;;
-esac
+ OSJEEPS=jeeps/gpslibusb.o
+ CFLAGS="$OCFLAGS"
+ #LIBS="$LIBS `libusb-config --libs`"
+ ], [
+ OSJEEPS=jeeps/gpsusbstub.o
+ ])
+ ])
+])
AC_SUBST(USB_LIBS)
AC_SUBST(USB_CFLAGS)
AC_SUBST(ZLIB)
dnl Linux HID support
-case "$target" in
- *-linux-*)
+AS_CASE(["$target"], [*-linux-*], [
AC_MSG_CHECKING(for Linux HID interface)
AC_COMPILE_IFELSE([AC_LANG_SOURCE([
#include <sys/ioctl.h>
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_LINUX_HID, 1, [Defined if you have Linux HID]),
AC_MSG_RESULT(no))
- ;;
-esac
+])
-case "$target" in
- *-*-darwin*)
- ;;
- *)
+AS_CASE(["$target"], [*-*-darwin*], [
+], [
AC_MSG_CHECKING(for reduce relocations)
OCPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS -I$QT_INC"
)]
)
CPPFLAGS="$OCPPFLAGS"
- ;;
-esac
-
-AC_MSG_CHECKING(for random stuff to make you feel better)
-AC_MSG_RESULT(failed)
-
-AC_MSG_CHECKING(for efence)
-AC_ARG_ENABLE(efence,
- [ --enable-efence=[yes|(no)]],
- [ if test "$enable_efence" != "no" ; then
- EFENCE_LIB=-lefence
- GPSBABEL_DEBUG=gpsbabel-debug
- INSTALL_DEBUG=install-debug
- fi])
+])
+
+AC_MSG_CHECKING([for random stuff to make you feel better])
+AC_MSG_RESULT([failed])
+
+AC_MSG_CHECKING([for efence])
+AC_ARG_ENABLE([efence],
+ [AS_HELP_STRING(
+ [--enable-efence],
+ [])],
+ [AS_IF([test "$enable_efence" != "no"], [
+ EFENCE_LIB=-lefence
+ GPSBABEL_DEBUG=gpsbabel-debug
+ INSTALL_DEBUG=install-debug
+ ])])
AC_SUBST(EFENCE_LIB)
AC_SUBST(GPSBABEL_DEBUG)
AC_SUBST(INSTALL_DEBUG)
-AC_MSG_RESULT($EFENCE_LIB)
-
-AC_MSG_CHECKING(for docdir)
-AC_ARG_WITH(doc,[ --with-doc=DIR Path where the documentation will be stored.],
- DOCDIR="$withval", DOCDIR="../babelweb/")
+AC_MSG_RESULT([$EFENCE_LIB])
+
+AC_MSG_CHECKING([for docdir])
+AC_ARG_WITH([doc],
+ [AS_HELP_STRING(
+ [--with-doc=DIR],
+ [Path where the documentation will be stored.])],
+ [DOCDIR="$withval"],
+ [DOCDIR="../babelweb/"])
AC_SUBST(DOCDIR)
+AC_MSG_RESULT([$DOCDIR])
# Checks for header files.
# AC_HEADER_STDC
AC_CONFIG_FILES([Makefile gbversion.h gui/setup.iss xmldoc/makedoc tools/mkcapabilities win32/gpsbabel.rc jeeps/Makefile shapelib/Makefile zlib/empty])
AC_CONFIG_FILES([gui/makelinuxdist.sh], [chmod +x gui/makelinuxdist.sh])
AC_OUTPUT
-